package com.wyw.design.model.learning.behavioral.mediator;

/**
 * @Title   抽象的中介公司角色
 * @Description 中介者角色中一般都要包含各个同事角色，因为它要负责这些对象之间的交互
 * @Author Mr Wu yewen.wu.china@gmail.com
 * @Date 2023/4/18 10:52
 * Update History:
 * Author        Time            Content
 */
public abstract class MeditorCompany {
    // 中介公司名称
    private String name;
    protected ColleagueSeller seller; // 卖家-同事角色
    protected ColleagueBuyer buyer; // 买家-同事角色
    // 发布一个需求，由中介公司去代为发布，入参为需求内容、发布人
    abstract void publish(String message, Colleaguer colleaguer);

    public MeditorCompany(String name) {
        this.name = name;
    }
    public ColleagueSeller getSeller() {
        return seller;
    }

    public void setSeller(ColleagueSeller seller) {
        this.seller = seller;
    }

    public ColleagueBuyer getBuyer() {
        return buyer;
    }

    public void setBuyer(ColleagueBuyer buyer) {
        this.buyer = buyer;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

